@font-face {
  font-family: 'GT-Walsheim';
  font-weight: 500;
  font-style: normal;
  font-display: fallback;
  src: url('/static/fonts/GT-Walsheim-Regular.woff2');
}

@font-face {
  font-family: 'GT-Walsheim';
  font-weight: 600;
  font-style: normal;
  font-display: fallback;
  src: url('/static/fonts/GT-Walsheim-Medium.woff2');
}

@font-face {
  font-family: 'GT-Walsheim';
  font-weight: 700;
  font-style: normal;
  font-display: fallback;
  src: url('/static/fonts/GT-Walsheim-Bold.woff2');
}

@font-face {
  font-family: 'GT-Walsheim';
  font-weight: 800;
  font-style: normal;
  font-display: fallback;
  src: url('/static/fonts/GT-Walsheim-Black.woff2');
}

:root {
  --color-primary: #6469FF;
  --color-black: #222328;
  --color-paragraph: rgb(102, 110, 117);
  --color-base-100: #FAFAFC;
  --color-base-200: #E6EBF4;
  --color-base-300: #BDC0CF;
  --color-base-400: #666;
  --color-error: #FF5B5B;
  --bezier-swift: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --bezier-snappy: cubic-bezier(.2, .8, .4, 1);
  --font-primary: 'GT-Walsheim';
  --box-shadow: 0 0 1px 0 rgba(189, 192, 207, 0.06), 0 10px 16px -1px rgba(189, 192, 207, 0.2);
  --box-shadow-hover: 0 0 1px 0 rgba(189, 192, 207, 0.06), 0 10px 16px -1px rgba(189, 192, 207, 0.4);
}

::selection {
  background-color: var(--color-primary);
  color: white;
}

*,
*::before,
*::after {
  outline-color: var(--color-primary);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  margin: 0;
  padding: 0;
  background-color: #F9FAFE;
}

blockquote {
  border-radius: 3px 6px 6px 3px;
  border-left: 3px solid #FFB963;
  background: rgba(#F8E8DD, 0.5);
  padding: 16px;
  margin: 24px 0;

  > p {
    margin: 0 !important;
  }
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
  color: var(--color-black);
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
}

h4 {
  font-size: 16px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border: 1px solid var(--color-base-200);
  height: 64px;
  padding: 0 32px;
  z-index: 1;

  svg {
    cursor: pointer;
  }

  a {
    display: flex;

    &:hover, &:focus {
      .github path {
        fill: var(--color-primary);
      }
    }
  }
}

a {
  color: var(--color-primary);
  font-weight: 600;
}

p {
  color: var(--color-paragraph);
  line-height: 24px;
}

main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 64px);
  max-width: 1024px;
  margin: 0 auto;
  padding: 32px;

  &.play {
    max-width: calc(560px + 64px);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(-50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

article {
  width: 100%;
  animation: fadeIn 0.5s var(--bezier-swift) forwards;

  svg {
    width: 100%;
  }

  strong {
    color: var(--color-black);
  }

  &:not(:last-of-type) {
    margin-bottom: 32px;
  }

  h1, h2, h3, h4, p:not(:last-child) {
    margin-bottom: 24px;
  }

  ul, ol {
    padding-left: 18px;
    margin: 24px 0;

    &:last-child {
      margin-bottom: 0;
    }

    li {
      color: var(--color-paragraph);
      line-height: 24px;

      &:not(:last-of-type) {
        margin-bottom: 8px;
      }
    }
  }

  ul {
    list-style-type: '• ';
  }

  code {
    font-size: 12px;
    padding-left: 5px;
    padding-right: 5px;
    background-color: rgba(100, 105, 255, 0.05);
    color: var(--color-primary);
    border-radius: 3px;
  }

  hr {
    height: 1px;
    background-color: var(--color-base-200);
    max-width: 80px;
    border: none;
    margin: 32px 0;
  }

  blockquote:last-child {
    margin-bottom: 0;
  }

  .prism-code {
    overflow: auto;
    border: 1px solid var(--color-base-200);
    border-radius: 4px;
    padding: 16px;
  }

  pre:not(:last-child) {
    .prism-code {
      margin-bottom: 24px;
    }
  }
}

pre {
  margin: 0;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;

  > * {
    width: 270px;
    margin: 32px 0;
  }
}

.checkboxExample {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 24px;

  input {
    width: 24px;
    height: 24px;
    margin: 0;
    appearance: none;
    border-radius: 4px;
    box-shadow: 0 2px 4px 0 rgba(#6469FF, 0.3);

    &:checked {
      background: var(--color-primary);

      ~ svg {
        opacity: 1;
      }
    }
  }

  svg {
    position: absolute;
    color: white;
    width: 16px;
    height: 16px;
    opacity: 0;
  }
}

fieldset {
  padding: 0;
  margin: 0;
  border: 0;

  legend {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
  }
}
